﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MusicStore.Controllers
{
    /// <summary>
    /// Store主页面。默认流派显示
    /// </summary>
    public class StoreController : Controller
    {
        // GET: Store
        public string Index()
        {
            return "我是Store的主页面!";
        }
        //Browse——浏览/列表
        //Details——详细

        /// <summary>
        /// 流派列表功能
        /// </summary>
        public string Browse(string genre)
        {
            string msg = HttpUtility.HtmlEncode("Store.Browse.Genre="+genre);
            return msg;
            //return "浏览/列表";
        }

        /// <summary>
        /// 音乐专辑列表功能
        /// 访问方式：/Store/Details/某个值
        /// </summary>
        public string Details(int id)
        {
            string msg = "Store.Detals.ID="+id;
            return msg;
            //return "详细页面";
        }

        //public ActionResult list()
        //{
        //    var album = new List<Album>();
        //    for(var i = 0; i < 5; i++)
        //    {
        //        album.Add(new Album(Title = "爱觉新罗.恺") + i);
        //    }
        //    ViewBag.Albums = album;
        //    return View();
        //}
    }
}